#pragma once
#include "LedButton.h"
#include "PubSub.h"
// CSerialComm dialog

class CSerialComm : public CDialog
{
	DECLARE_DYNAMIC(CSerialComm)
	int m_ComNo;
	int m_ComBaut;
	int m_ComData;
	int m_ComStop;
	int m_ComParity;
	CPubSub *m_PubSub;
	CLedButton	m_led;
	bool m_Connected;
	CEdit	m_TraceWnd;
public:
	CSerialComm(CWnd* pParent = NULL);   // standard constructor
	virtual ~CSerialComm();
	void GetComPara();
	void Trace(LPCTSTR szFmt, ...);
// Dialog Data
	enum { IDD = IDD_SERIAL_COMM };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedConnect();
	afx_msg void OnTimer(UINT nIDEvent);
public:
	afx_msg void OnBnClickedOk();
public:
	afx_msg void OnBnClickedCance();
public:
	afx_msg void OnBnClickedAtuoConnect();
};
